package com.example.onlineeducation.mapper

import com.example.onlineeducation.data.entity.StudyPlanEntity
import com.example.onlineeducation.data.json.StudyPlanListJson
import com.yc.jetpacklib.extension.ycToNoEmpty
import com.yc.jetpacklib.mapper.IMapper

class StudyPlanMapper : IMapper<StudyPlanListJson, StudyPlanEntity> {
    override fun map(input: StudyPlanListJson): StudyPlanEntity = StudyPlanEntity(
        input.groupId,
        input.mediaUrl,
        input.groupName.ycToNoEmpty(),
        input.beginTime,
        input.endTime,
        input.studyStatus
    )
}

